<?php

namespace App\Models\UserModels;


class RulesModel extends UserCenterModel
{
    public $table = 'rules';

    public $fillable = [
        'rule',
        'module',
        'controller',
        'method',
        'path',
        'icon',
        'parent_id',
        'status',
        'is_show',
        'sort',
    ];

    public function getIdsUrlAttribute($value)
    {
        $res = explode(',', $value);
        foreach ($res as &$v) {
            $v = (int)$v;
        }
        return $res;
    }
}
